*Produce individual out-of-sample forecasts


foreach var of varlist dp-lastpredictor{


	di `var'
	qui{
	gen fxx`var'=.
	gen sfxx`var'=.

	gen wfxx`var'=.
	gen wsfxx`var'=.
	
	capture drop svarpredxx
	gen svarpredxx=.
	capture drop weight
	gen weight=.
	
	forvalues i=$tsamplestart/$tlastpred{
		
		*Variance prediction for weighted least squares		
		capture drop rvpred
		capture reg svar l.svar l.svar11 if yy>$samplestart & time<`i'
		capture predict rvpred 
		capture replace weight = 1/rvpred
	
	
		*univariate prediction with log returns
		capture drop x
		capture reg lnexret l.`var' if yy>$samplestart & time<`i'+1-$h
		capture predict x
		capture replace fxx`var'=x if time==`i'

		*univariate prediction with simple returns
		capture drop x
		capture reg exret l.`var' if yy>$samplestart & time<`i'+1-$h
		capture predict x
		capture replace sfxx`var'=x if time==`i'
	
		*univariate prediction with weighted least squares
		capture drop x
		capture drop wx
		capture reg lnexret l.`var' if yy>$samplestart & time<`i'+1-$h  [aweight=weight]
		capture predict x
		capture replace wfxx`var'=x if time==`i'
			
		
		capture drop x
		capture drop wx
		capture reg exret l.`var' if yy>$samplestart & time<`i'+1-$h  [aweight=weight]
		capture predict x
		capture replace wsfxx`var'=x if time==`i'
		
	
		}

	}
}
